<template>
  <div ref="myechart" class="bar"></div>
</template>

<script>
import * as echarts from 'echarts'
export default {
  name: 'BarChart',
  mounted() {
    let myechart = echarts.init(this.$refs.myechart)
    myechart.setOption({
      xAxis: {
        show: false,
        // 均分
        type: 'category',
      },
      yAxis: {
        show: false,
      },
      series: [
        {
          type: 'bar',
          data: [30, 20, 33, 25, 40, 35, 55, 60, 22, 10, 35, 45],
          color: 'rgb(0,0,255)',
        },
      ],
      grid: {
        left: 0,
        right: 0,
        top: 0,
        bottom: 0,
      },
      tooltip: {},
    })
  },
}
</script>

<style >
.bar {
  width: 100%;
  height: 100%;
}
</style>